﻿using Lightworks.Core.Constant;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;

namespace Lightworks.Api.Controllers
{
    [Route("api/file/")]
    [ApiController]
    public class UploadController : ApiBaseController
    {
        ISqlSugarClient client;
        public UploadController(ISqlSugarClient sqlSugarClient) 
        {
            client = sqlSugarClient;
        }

        [HttpGet]
        public ApiResult GenModel() 
        {
            client.DbFirst.CreateClassFile(@"e:\temp", "Lightworks.System.Models");
            return Ok();
        }
    }
}
